'use strict';

/**
 * The main MVC app module.
 *
 * @type {angular.Module}
 */

var resultatsModule = angular.module('ResultatsModule', ['ngTagsInput', 'LocalStorageModule','multi-select', 'ngAnimate', 'ui.bootstrap', 'filters', 'ThumbnailDirectives']);
	
	resultatsModule.factory('CacheService', ['localStorageService', function(localStorageService) {
		return new CacheService(localStorageService);
	}]);
	
	resultatsModule.factory('Recherche', ['$http', '$q', 'localStorageService', 'CacheService', function($http, $q, localStorageService, CacheService) {
		return new RechercheModel($http, $q, localStorageService, CacheService);
	}]);

	resultatsModule.factory('StringManager', ['$http', '$rootScope', function($http, $rootScope) {
		return new StringManagerModel($http, $rootScope);
	}]);

	resultatsModule.directive('linktosejour', ['StringManager', function factory(StringManager) {
	    return new LinktoSejourDirective(StringManager);
	}]);

	resultatsModule.controller('ResultatsController', ['$scope', 'Recherche', 'StringManager',  ResultatsController]);
	